package com.ruoyi.web.controller.common;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.service.DDLService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * packageName com.ruoyi.patrol.controller
 *
 * @author nan.li
 * @version JDK 8
 * @className DDLController
 * @date 2024/3/1
 * @description TODO
 */
@RestController
@RequestMapping("ddl")
public class DDLController {

    @Autowired
    private DDLService ddlService;

    @GetMapping("table-count")
    public AjaxResult getTableCount(String tableName){
        return AjaxResult.success(ddlService.count(tableName));
    }
}